#define _CRT_SECURE_NO_WARNINGS

#include "string.h"

void test1()
{
	bit::string s1("sa1d3");
	bit::string s2(s1);
	s2 = s1;
	cout << s1.c_str() << endl;
	cout << s2.c_str() << endl;

}

void test2()
{
	bit::string s1;
	s1.push_back('a');
	s1.push_back('\0');
	s1.push_back('a');
	s1.push_back('a');
	s1.push_back(' ');
	s1.push_back('a');
	s1.push_back('a');
	s1.push_back('a');
	//bit::string s2(s1);
	bit::string s2 = s1;
	for (auto e : s1)
	{
		cout << e << ' ';
	}
	cout << endl;
	for (auto e : s2)
	{
		cout << e << ' ';
	}
	cout << endl;
}

void test3()
{
	bit::string s1;
	s1.push_back('H');
	s1 += 'e';
	s1 += 'l';
	s1 += 'l';
	s1 += 'o';
	s1 += ' ';
	s1 += '\0';
	s1 += "World";
	s1.append("!!!");
	bit::string s2(s1);
	bit::string s3("a");
	s3 = s1;
	s3 += '!';
	cout << "s1:" << s1 << endl;
	cout << "s2:" << s2 << endl;
	cout << "s3:" << s3 << endl;
	cout << (s2 == s3) << endl;
	
}

void test4()
{
	bit::string s1;
	cin >> s1;
	cout << s1 << endl;
}

void test5()
{
	bit::string s1;
	cin >> s1;
	cout << s1 << endl;
	s1.resize(5, 'y');
	cout << s1 << endl;
}

int main()
{
	test3();
	return 0;
}